package 组件模式;

public class 组件模式 {
    public static void main(String[] args) {

        File file=new File("file1.txt");
        File file1=new File("file2.txt");
        Directory directory=new Directory("Subdirectory");
        directory.addComponents(file);
        directory.addComponents(file1);
        Directory directory1=new Directory("root");
        directory1.addComponents(directory);
        directory1.displayInfo();
    }
}
